/**
 * 游戏角色
 * @param name 角色名
 * @param attack 攻击力
 * @param defence 防御力
 * @param hp 生命值
 * @param critRate 暴击率
 */
function Charactor(name, attack, defence, hp, critRate) {
    this.name=name
    this.attack=attack
    this.defence=defence
    this.hp=hp
    this.critRate=critRate
}

let hero = new Charactor("英雄", 20, 50, 500, 0.5)
let master = new Charactor("怪兽", 20, 500, 0, 0)